package com.dsj.gxrd.modules.controller.activity;

import com.dsj.gxrd.modules.activity.domain.entity.RdFeedBack;
import com.dsj.gxrd.modules.activity.service.RdFeedbackService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * ok
 * @author songpin566
 * @date 2023/10/17
 **/
@RestController
@Api("代表之家")
@RequestMapping("/feed/back")
public class RdFeedbackController extends BaseController {

    @Autowired
    private RdFeedbackService rdFeedbackService;

    /**
     * 代表之声前台门户查询每个乡镇的内容(比如江口镇人大代表和人大主席处理的所有内容)
     */
    @GetMapping("/list")
    public TableDataInfo list(Long deptId) {
        startPage();
        List<RdFeedBack> list = rdFeedbackService.selectFeedbackLists(deptId);
        return getDataTable(list);
    }

    /**
     * 代表之声前台门户查询区人大管理员处理的数据
     */
    @GetMapping("/district/list")
    public TableDataInfo districtList(RdFeedBack feedBack) {
        startPage();
        List<RdFeedBack> list = rdFeedbackService.selectDistrictList(feedBack);
        return getDataTable(list);
    }


}
